#pragma once

#include "includeBase.h"

#include "../core/AppContext.h"

#include <utils/QtUtil.h>
#include <utils/StringUtil.h>

#include <widgets/AppGraphicsScene.h>
#include <widgets/AppGraphicsView.h>

#include "report/ReportViewer.h"

class ReportWidget : public QWidget
{
protected:
    Q_OBJECT

public:
    ReportWidget(QWidget* parent = nullptr);
    ~ReportWidget();

public:
    void loadReport();

private: // methods
    void setupUi();
    void setupMain();
    void setupReport();
    void setupActions();

private slots:
    void onPrintPreview() const;
    void onPrintReport() const;
    void onReportFetchRecord();

private: // Fields
    QGridLayout* layoutMain;
    Report* report_ = nullptr;
    ReportViewer* viewer_ = nullptr;
};
